package nanzhuli.user.svc.util.conf;

import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

public class DirectConnection implements Condition {

	@Override
	public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
		String m = context.getEnvironment().getProperty("nanzhuli.serviceCallMethod");
		return StringUtils.isNotBlank(m) && m.contains("Direct");
	}

}